#ifndef SkyDome_h__
#define SkyDome_h__

#include <d3dx9.h>
#include "Vertex.h"

class SkyDome
{
private:
	typedef Vertex_PNT  Vertex;
	IDirect3DDevice9*         m_device;
	IDirect3DVertexBuffer9*   m_vb;
	IDirect3DIndexBuffer9*    m_ib;

	float                     m_radius;
	int                       m_numTheta;
	int                       m_numPhi;
	int                       m_numVertices;
	int                       m_numTriangles;
public:
	SkyDome(IDirect3DDevice9* device, float radius, int numTheta, int numPhi);
	void Init();
	void Destory();
	void Render();

private:
	void GenerateVertices();
	void ComputeTexture();

};


#endif // SkyDome_h__